package com.six.backend.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @Author: skyler
 * @Date: 2021/11/6 15:00
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Builder
@ApiModel("权限")
public class Authority implements Serializable {
    @NotNull
    @ApiModelProperty("权限id")
    private Integer id;

    @ApiModelProperty("权限父id")
    private Integer parentId;

    @ApiModelProperty("权限名称")
    private  String name;

    @ApiModelProperty("前端展示权限名称")
    private String label;

    @ApiModelProperty("权限url")
    private String url;

    @ApiModelProperty("需要的权限")
    private String permission;

    @ApiModelProperty("权限类型（0表示目录，1表示菜单，2表示按钮)")
    private String type;

    @ApiModelProperty("子权限列表")
    private List<Authority> children;
}
